import pandas as pd


# 读取清洗后的四个文件
file_path= '../../data/cleared data/'
store = pd.read_excel(file_path+'餐饮连锁数据_门店信息_cleaned.xlsx')
dish = pd.read_excel(file_path+'餐饮连锁数据_菜品信息_cleaned.xlsx')
sales = pd.read_excel(file_path+'餐饮连锁数据_销售记录2_cleaned.xlsx')
review = pd.read_excel(file_path+'餐饮连锁数据_顾客评价2_cleaned.xlsx')

# 统一导出为一个多 sheet 的 Excel 文件
with pd.ExcelWriter(file_path+'餐饮连锁数据_清洗后总表.xlsx') as writer:
    store.to_excel(writer, sheet_name='门店信息', index=False)
    dish.to_excel(writer, sheet_name='菜品信息', index=False)
    sales.to_excel(writer, sheet_name='销售记录', index=False)
    review.to_excel(writer, sheet_name='顾客评价', index=False)

print("✅ 合并完成，已生成：餐饮连锁数据_清洗后总表.xlsx")
